Skip to content

feat(automation): Phase 6.1 – Production Validation helpers, CLI and tests - #2495

Merged
ashleyshaw merged 11 commits into
developfrom
copilot/reporting-agent-v2-phase-6-1
Sep 3, 2026
Merged

feat(automation): Phase 6.1 – Production Validation helpers, CLI and tests#2495
ashleyshaw merged 11 commits into
developfrom
copilot/reporting-agent-v2-phase-6-1

Conversation

Copilot AI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements Phase 6.1 production validation deliverables (deployment checklist, environment setup, smoke tests, rollback plan, monitoring/alerting) as a testable Node.js module with CLI wrapper.

Changes Made

Added

  • production-validation-helpers.js — Pure functions for each deliverable:

    • runDeploymentChecklist — Verifies deployment checklist items
    • setupProductionEnvironment — Confirms services are running and healthy
    • runSmokeTests — Exercises key production endpoints
    • validateRollbackPlan — Asserts plan is documented and tested
    • configureMonitoring — Wires notification channels and validates alert thresholds
    • executeAllProductionValidations — Orchestrates all five, returns GO/NO-GO + summary
  • production-validation.js — CLI wrapper supporting:

    • --task <name> or --all for individual or bulk execution
    • --verbose, --no-dry-run, --max-rollback flags
  • production-validation.test.js — 56 comprehensive unit, integration, and edge-case tests (0 CodeQL alerts)

Linked Issue

Resolves #2043


🤖 Generated with Claude Code

Copilot AI added 2 commits August 29, 2026 15:34
…d tests

Closes #2043

- production-validation-helpers.js: five Phase 6.1 deliverable functions
  (runDeploymentChecklist, setupProductionEnvironment, runSmokeTests,
  validateRollbackPlan, configureMonitoring) plus parseProductionArguments
  and executeAllProductionValidations
- production-validation.js: CLI script mirroring staging-validation.js
- __tests__/production-validation.test.js: 56 unit, integration, and
  edge-case tests – all passing
Copilot AI changed the title [WIP] Finalize production validation for reporting agent v2 feat(automation): Phase 6.1 – Production Validation helpers, CLI and tests Aug 29, 2026
Copilot AI requested a review from ashleyshaw August 29, 2026 15:40
@ashleyshaw
ashleyshaw requested a lite review from Copilot August 29, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are API/CLI usability issues (empty override arrays silently falling back to defaults and failures not surfacing error messages) plus a potentially risky lockfile change removing libc constraints for native optional deps.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a Phase 6.1 “production validation” automation module (helpers + CLI) under scripts/automation/, modelled on the existing staging validation pattern, plus a Jest test suite to exercise the new helpers.

Changes:

  • Added production-validation-helpers.js with pure helper functions for checklist, environment, smoke tests, rollback validation, monitoring config, arg parsing, and orchestration.
  • Added production-validation.js CLI entrypoint to run a single task or all checks and set process exit codes accordingly.
  • Added production-validation.test.js Jest suite covering defaults, overrides, and edge cases for the helpers.
File summaries
File Description
scripts/automation/production-validation.js New CLI wrapper for running Phase 6.1 production validation tasks and reporting results.
scripts/automation/production-validation-helpers.js New helper module implementing the production validation task functions and orchestration.
scripts/automation/tests/production-validation.test.js New Jest coverage for the production validation helper functions.
package-lock.json Lockfile update removing libc constraints from several platform-specific optional native packages.
Review details

Suppressed comments (1)

scripts/automation/production-validation-helpers.js:220

  • Similar to the checklist helper, providing options.channels: [] currently falls back to the default channels. This is surprising for an API that accepts overrides and makes it hard to intentionally configure zero channels during testing. Only default when options.channels is undefined, and fail fast on an empty array.
  const channels =
    options.channels && options.channels.length > 0
      ? options.channels
      : defaultChannels;

  • Files reviewed: 3/4 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/automation/production-validation-helpers.js Outdated
Comment thread scripts/automation/production-validation-helpers.js
Comment thread scripts/automation/production-validation.js
@ashleyshaw
ashleyshaw marked this pull request as ready for review August 29, 2026 16:31
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@ashleyshaw
ashleyshaw enabled auto-merge (squash) August 29, 2026 16:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

ashleyshaw and others added 2 commits August 29, 2026 18:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

⚠️ A merged PR reached develop without passing the template content guardrail.

Missing required section(s): Linked issues, Changelog, Global DoD checklist

This is a post-merge backstop for admin bypasses. Please review branch protection for develop.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@ashleyshaw ashleyshaw added this to the v1.1 milestone Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Branch Naming Issue

This PR's branch name copilot/reporting-agent-v2-phase-6-1 doesn't follow the standard pattern.

Standard pattern: {type}/{scope}-{title} (e.g., feat/something, fix/bug-name)

Based on linked issue type: task

Correct template should be: pr_feature.md

No action required — this is informational. Future PRs should use the correct branch name.

See Branching Strategy for more info.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

❌ Branch Name Validation Failed

The branch name copilot/reporting-agent-v2-phase-6-1 does not follow the LightSpeed branching strategy.

Required Format

{type}/{scope}-{short-title}
  • type: one of the allowed prefixes (lowercase)
  • scope: lowercase, hyphens only (no underscores or uppercase)
  • title: lowercase, hyphens only (no underscores or uppercase)

Allowed Branch Types

feat, fix, hotfix, release, refactor, chore, docs, test, perf, ci, build, deps, security, revert, research, design, a11y, ux, i18n, ops, proto, ds, api, schema, telemetry, content, seo, config, migrate, qa, uat, audit, codex

Valid Examples

  • feat/branch-naming-enforcement
  • fix/validation-script-bug
  • chore/update-dependencies
  • docs/branching-strategy-guide
  • hotfix/critical-security-patch

Invalid Examples

  • claude/my-branch (type "claude" not allowed)
  • Feature/MyBranch (uppercase not allowed)
  • fix-bug (missing type prefix)
  • feat/my_feature (underscores not allowed)
  • feat/MyFeature (uppercase not allowed)

Solution

Rename your branch to follow the pattern and update the PR.

For more information, see docs/BRANCHING_STRATEGY.md.

@claude claude Bot added area:ci Build and CI pipelines area:scripts Scripts & tooling area:tests Test suites & harnesses lang:js JavaScript/TypeScript lang:json JSON config/content type:bug Bug or defect labels Sep 2, 2026
@ashleyshaw ashleyshaw added type:feature Feature or enhancement and removed area:ci Build and CI pipelines type:bug Bug or defect labels Sep 3, 2026 — with Claude

@ashleyshaw ashleyshaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@ashleyshaw

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

auto-merge was automatically disabled September 3, 2026 16:36

Head branch was pushed to by a user without write access

Copilot AI commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved — I merged origin/develop into this branch and fixed the package-lock.json conflict in commit bc37f7d.

Copilot AI requested a review from ashleyshaw September 3, 2026 16:37
@ashleyshaw
ashleyshaw merged commit 2b0e4a7 into develop Sep 3, 2026
6 checks passed
@ashleyshaw
ashleyshaw deleted the copilot/reporting-agent-v2-phase-6-1 branch September 3, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:scripts Scripts & tooling area:tests Test suites & harnesses lang:js JavaScript/TypeScript lang:json JSON config/content type:feature Feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reporting Agent v2 Phase 6.1: Production Validation

3 participants